package czy.demo.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class SpringApplicationListener implements ApplicationListener {

    private static final Logger logger = LoggerFactory.getLogger(SpringApplicationListener.class);

    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        logger.info("监听到应用程序事件："+event.toString());
    }
}
